import * as types from '../../mutation-types/adv-assets/index';

const state = {
    adsIndex: '5',
    advAssetsImagesList : [],
    advAssetsVideoList : [],
    advAssetsAudienceList : []  
};

/*export const ADV_ASSETS_IMAGE_LIST = 'ADV_ASSETS_IMAGE_LIST';
export const ADV_ASSETS_IMAGE_LIST_ADD = 'ADV_ASSETS_IMAGE_LIST_ADD';
export const ADV_ASSETS_VIDEO_LIST = 'ADV_ASSETS_VIDEO_LIST';
export const ADV_ASSETS_VIDEO_LIST_ADD = 'ADV_ASSETS_VIDEO_LIST_ADD';*/

const mutations = {
    [types.ADS_INDEX](state, {adsIndex}) {
        state.adsIndex = adsIndex || '5';
    },
	[types.ADV_ASSETS_IMAGE_LIST] (state , {advAssetsImagesLis}){
		state.advAssetsImagesLis = advAssetsImagesLis;
	},
    [types.ADV_ASSETS_IMAGE_LIST_ADD] (state , preload){
        state.advAssetsImagesLis.push(preload);
    },
    [types.ADV_ASSETS_VIDEO_LIST] (state , {advAssetsVideoList}){
        state.advAssetsVideoList = advAssetsVideoList;
    },
    [types.ADV_ASSETS_VIDEO_LIST_ADD] (state , preload){
        state.advAssetsVideoList.push(preload);
    },
    [types.ADV_ASSETS_AUDIENCE_LIST] (state , {advAssetsAudienceList}){
        state.advAssetsAudienceList = advAssetsAudienceList;
    },
    [types.ADV_ASSETS_AUDIENCE_LIST_ADD] (state , preload){
        state.advAssetsAudienceList.push(preload);
    }
};

export default {
	state ,
	mutations
};